#pragma once
#include "wfx.h"
#include "Statement.h"
#include "Grammar.h"
#include <vector>

MAKE_PTR(CStatementList);

class CStatementList: public CStatement
{
public:
	static CStatementListPtr create()
	{
		return CStatementListPtr(new CStatementList());
	}

public:
	CStatementList()
	{

	}
protected:
	EvalType virtual doEval()
	{
		for (std::vector<CStatementPtr>::iterator it = m_statementList.begin();
			it != m_statementList.end();
			++it)
		{
			(*it)->eval();
		}

		return 0;
	}

public:
	void AddStatement(CStatementPtr pStatement)
	{
		this->m_statementList.push_back(pStatement);
	}

public:
	std::vector<CStatementPtr> m_statementList;

	CScopePtr m_pScope;
};